import { responseData } from "@/api/product/trademarkApi/interface.ts";

export interface spu {
  id?: number;
  tmId: number | string;
  category3Id: number | string;
  spuName: string;
  description: string;
  spuImageList: spuImage[] | null;
  spuSaleAttrList: saleAttributeValue[] | null;
  updateTime?: string;
  createTime?: string;
}

export interface spuInfo {
  countId: null;
  current: number;
  hitCount: boolean;
  maxLimit: null;
  optimizeCountSql: boolean;
  orders: any[];
  pages: number;
  records: spu[];
  searchCount: boolean;
  size: number;
  total: number;
}

export interface responseSpuInfo extends responseData {
  data: spuInfo;
}


export interface spuImage {
  id?: number;
  spuId?: number;
  imgName: string;
  imgUrl: string;
  updateTime?: string;
  createTime?: string;
  url?: string,
  name?: string
}

export interface responseSpuIMageList {
  data: spuImage[];
}


export interface baseSaleAttribute {
  createTime: string;
  id: number;
  name: string;
  updateTime: string;
}

export interface responseBaseSaleAttribute {
  data: baseSaleAttribute[];
}


export interface saleAttributeValue {
  baseSaleAttrId: number;
  id: number;
  isChecked: string | null;
  saleAttrName: string;
  saleAttrValueName: string;
  spuId: number;
  updateTime?: null;
  createTime?: null;
}

export interface saleAttributeInfo {
  saleAttrName: string;
  baseSaleAttrId: number | string;
  spuSaleAttrValueList: saleAttributeValue[];
  flag?: boolean;
  createTime?: null;
  id?: number;
  spuId?: number;
  updateTime?: null;
}

export interface responseSaleAttribute extends responseData {
  data: saleAttributeInfo[];
}




export interface sku {
  category3Id: string | number,
  spuId: string | number,
  tmId: string | number,
  skuName: string,
  price: string | number,
  weight: string | number,
  skuDesc: string,
  skuAttrValueList: [{ attrId: number | string, valueId: number | string }],
  skuSaleAttrValueList: [{ saleAttrId: number | string, saleAttrValueId: number | string }],
  skuDefaultImg: string,
}
